﻿using DevExpress.XtraBars;
using DevTeam;

using System;
using System.Collections.Generic;
using System.Data;

namespace ConfExpert.Forms.SatinAlma.YeniYapi
{
    public partial class Repete : XPopupForm
    {
        public Repete()
        {
            InitializeComponent();
        }

        private void Repete_Load(object sender, EventArgs e)
        {
            

            gv.Init("GetRepete",WhoAmI);

            gv.SetCaptions("PONr:PO Nr.","GonderilmeTarihi:Gönderilme Tarihi","HLNo:H/L","MusteriKodu:Müşteri Kodu","QtyOrdered:Sipariş Metraj","OrderRef:Order Ref.");
            gv.FormatAsDate("GonderilmeTarihi");
            gv.FormatAsNumber(1, "QtyOrdered");
            gv.MakeRowSelectable();
            gv.MakeReadOnly();
            gv.BestFitColumns();
        }

        public List<DataRow> SelectedRows = new List<DataRow>();
       
        private void btnEkle_ItemClick(object sender, ItemClickEventArgs e)
        {
            gv.EndEditing();
            foreach (int handle in gv.GetSelectedRows())
                SelectedRows.Add(gv.GetDataRow(handle));

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
    }
}
